package zuo;

public class Simulator {
    public void piaySound(Animal animal){
        animal.name="旺财";

    }

    public static void main(String[] args) {
        Simulator animal=new Simulator();
        Animal mal=new Dog();
        animal.piaySound(mal);
        mal.cry();
        mal.getAnimalName();
        Animal mal1=new Cat();
        mal1.cry();
        mal1.getAnimalName();
    }
}
